<style type="text/css">.fb_hidden{position:absolute;top:-10000px;z-index:10001}
  .fb_invisible{display:none}
  .fb_reset{background:none;border:0;border-spacing:0;color:#000;cursor:auto;direction:ltr;font-family:"lucida grande", tahoma, verdana, arial, sans-serif;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal}
  .fb_reset > div{overflow:hidden}
  .fb_link img{border:none}
  .fb_dialog{background:rgba(82, 82, 82, .7);position:absolute;top:-10000px;z-index:10001}
  .fb_dialog_advanced{padding:10px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}
  .fb_dialog_content{background:#fff;color:#333}
  .fb_dialog_close_icon{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 0 transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v2/yL/r/s816eWC-2sl.gif);cursor:pointer;display:block;height:15px;position:absolute;right:18px;top:17px;width:15px;top:8px\9;right:7px\9}
  .fb_dialog_mobile .fb_dialog_close_icon{top:5px;left:5px;right:auto}
  .fb_dialog_padding{background-color:transparent;position:absolute;width:1px;z-index:-1}
  .fb_dialog_close_icon:hover{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -15px transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v2/yL/r/s816eWC-2sl.gif)}
  .fb_dialog_close_icon:active{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -30px transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v2/yL/r/s816eWC-2sl.gif)}
  .fb_dialog_loader{background-color:#f2f2f2;border:1px solid #606060;font-size:24px;padding:20px}
  .fb_dialog_top_left,
  .fb_dialog_top_right,
  .fb_dialog_bottom_left,
  .fb_dialog_bottom_right{height:10px;width:10px;overflow:hidden;position:absolute}
  .fb_dialog_top_left{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 0;left:-10px;top:-10px}
  .fb_dialog_top_right{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 -10px;right:-10px;top:-10px}
  .fb_dialog_bottom_left{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 -20px;bottom:-10px;left:-10px}
  .fb_dialog_bottom_right{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 -30px;right:-10px;bottom:-10px}
  .fb_dialog_vert_left,
  .fb_dialog_vert_right,
  .fb_dialog_horiz_top,
  .fb_dialog_horiz_bottom{position:absolute;background:#525252;filter:alpha(opacity=70);opacity:.7}
  .fb_dialog_vert_left,
  .fb_dialog_vert_right{width:10px;height:100%}
  .fb_dialog_vert_left{margin-left:-10px}
  .fb_dialog_vert_right{right:0;margin-right:-10px}
  .fb_dialog_horiz_top,
  .fb_dialog_horiz_bottom{width:100%;height:10px}
  .fb_dialog_horiz_top{margin-top:-10px}
  .fb_dialog_horiz_bottom{bottom:0;margin-bottom:-10px}
  .fb_dialog_iframe{line-height:0}
  .fb_dialog_content .dialog_title{background:#6d84b4;border:1px solid #3b5998;color:#fff;font-size:14px;font-weight:bold;margin:0}
  .fb_dialog_content .dialog_title > span{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yd/r/Cou7n-nqK52.gif)
                                            no-repeat 5px 50%;float:left;padding:5px 0 7px 26px}
  body.fb_hidden{-webkit-transform:none;height:100%;margin:0;overflow:visible;position:absolute;top:-10000px;left:0;width:100%}
  .fb_dialog.fb_dialog_mobile.loading{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ya/r/3rhSv5V8j3o.gif)
                                        white no-repeat 50% 50%;min-height:100%;min-width:100%;overflow:hidden;position:absolute;top:0;z-index:10001}
  .fb_dialog.fb_dialog_mobile.loading.centered{max-height:590px;min-height:590px;max-width:500px;min-width:500px}
  #fb-root #fb_dialog_ipad_overlay{background:rgba(0, 0, 0, .45);position:absolute;left:0;top:0;width:100%;min-height:100%;z-index:10000}
  #fb-root #fb_dialog_ipad_overlay.hidden{display:none}
  .fb_dialog.fb_dialog_mobile.loading iframe{visibility:hidden}
  .fb_dialog_content .dialog_header{-webkit-box-shadow:white 0 1px 1px -1px inset;background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#738ABA), to(#2C4987));border-bottom:1px solid;border-color:#1d4088;color:#fff;font:14px Helvetica, sans-serif;font-weight:bold;text-overflow:ellipsis;text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0;vertical-align:middle;white-space:nowrap}
  .fb_dialog_content .dialog_header table{-webkit-font-smoothing:subpixel-antialiased;height:43px;width:100%
  }
  .fb_dialog_content .dialog_header td.header_left{font-size:12px;padding-left:5px;vertical-align:middle;width:60px
  }
  .fb_dialog_content .dialog_header td.header_right{font-size:12px;padding-right:5px;vertical-align:middle;width:60px
  }
  .fb_dialog_content .touchable_button{background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#4966A6),
                                         color-stop(0.5, #355492), to(#2A4887));border:1px solid #29447e;-webkit-background-clip:padding-box;-webkit-border-radius:3px;-webkit-box-shadow:rgba(0, 0, 0, .117188) 0 1px 1px inset,
                                         rgba(255, 255, 255, .167969) 0 1px 0;display:inline-block;margin-top:3px;max-width:85px;line-height:18px;padding:4px 12px;position:relative}
  .fb_dialog_content .dialog_header .touchable_button input{border:none;background:none;color:#fff;font:12px Helvetica, sans-serif;font-weight:bold;margin:2px -12px;padding:2px 6px 3px 6px;text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0}
  .fb_dialog_content .dialog_header .header_center{color:#fff;font-size:16px;font-weight:bold;line-height:18px;text-align:center;vertical-align:middle}
  .fb_dialog_content .dialog_content{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/y9/r/jKEcVPZFk-2.gif) no-repeat 50% 50%;border:1px solid #555;border-bottom:0;border-top:0;height:150px}
  .fb_dialog_content .dialog_footer{background:#f2f2f2;border:1px solid #555;border-top-color:#ccc;height:40px}
  #fb_dialog_loader_close{float:left}
  .fb_dialog.fb_dialog_mobile .fb_dialog_close_button{text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0}
  .fb_dialog.fb_dialog_mobile .fb_dialog_close_icon{visibility:hidden}
  .fb_iframe_widget{display:inline-block;position:relative}
  .fb_iframe_widget span{display:inline-block;position:relative;text-align:justify}
  .fb_iframe_widget iframe{position:absolute}
  .fb_iframe_widget_lift{z-index:1}
  .fb_hide_iframes iframe{position:relative;left:-10000px}
  .fb_iframe_widget_loader{position:relative;display:inline-block}
  .fb_iframe_widget_fluid{display:inline}
  .fb_iframe_widget_fluid span{width:100%}
  .fb_iframe_widget_loader iframe{min-height:32px;z-index:2;zoom:1}
  .fb_iframe_widget_loader .FB_Loader{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/y9/r/jKEcVPZFk-2.gif) no-repeat;height:32px;width:32px;margin-left:-16px;position:absolute;left:50%;z-index:4}
  .fb_connect_bar_container div,
  .fb_connect_bar_container span,
  .fb_connect_bar_container a,
  .fb_connect_bar_container img,
  .fb_connect_bar_container strong{background:none;border-spacing:0;border:0;direction:ltr;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal;vertical-align:baseline}
  .fb_connect_bar_container{position:fixed;left:0 !important;right:0 !important;height:42px !important;padding:0 25px !important;margin:0 !important;vertical-align:middle !important;border-bottom:1px solid #333 !important;background:#3b5998 !important;z-index:99999999 !important;overflow:hidden !important}
  .fb_connect_bar_container_ie6{position:absolute;top:expression(document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px":body.scrollTop+"px")}
  .fb_connect_bar{position:relative;margin:auto;height:100%;width:100%;padding:6px 0 0 0 !important;background:none;color:#fff !important;font-family:"lucida grande", tahoma, verdana, arial, sans-serif !important;font-size:13px !important;font-style:normal !important;font-variant:normal !important;font-weight:normal !important;letter-spacing:normal !important;line-height:1 !important;text-decoration:none !important;text-indent:0 !important;text-shadow:none !important;text-transform:none !important;white-space:normal !important;word-spacing:normal !important}
  .fb_connect_bar a:hover{color:#fff}
  .fb_connect_bar .fb_profile img{height:30px;width:30px;vertical-align:middle;margin:0 6px 5px 0}
  .fb_connect_bar div a,
  .fb_connect_bar span,
  .fb_connect_bar span a{color:#bac6da;font-size:11px;text-decoration:none}
  .fb_connect_bar .fb_buttons{float:right;margin-top:7px}
  .fbpluginrecommendationsbarleft,
  .fbpluginrecommendationsbarright{position:fixed !important;bottom:0;z-index:999}
  .fbpluginrecommendationsbarleft{left:10px}
  .fbpluginrecommendationsbarright{right:10px}</style>



<div style="display: none; background-color: yellow; font-size: 9pt; text-align: center; padding: 3px; margin-bottom: 4px;" id="PopBlockNotification">
  <div style="width: 760px;">
    <table align="center" border="0" cellpadding="3" cellspacing="0">
      <tbody><tr>
          <td>
            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/animatedexclamation.gif" alt="!">
          </td>
          <td align="center">
            Your popup blocker stopped you from chatting with a member. <a href="javascript:void(0);" onclick="popNewICWindow();">click here</a> to open the window<br>
            <a href="#help">Click here</a> to learn how to disable your popup blocker on BBPeopleMeet.com
          </td>
          <td>
            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/animatedexclamation.gif" alt="!">
          </td>
        </tr>
      </tbody></table>
  </div>
</div>


<style>
  .invalidFileSelected {color:red;}
</style>


<div id="CSPhotoSelectorNoPhotos">
  <div class="overlaywholescreen"></div>
  <div class="CSPhotoSelector_dialog">
    <div class="CSPhotoSelector_form">
      <div class="CSPhotoSelector_header">
        <p>Unable to find photos</p>
      </div>
      <div class="CSPhotoSelector_content">
        <h1>There are no photos available to import</h1>
        <p><a href="javascript:;" onclick="javascript:$jq('#CSPhotoSelectorNoPhotos').hide();">click here to cancel importing</a></p>
      </div>
    </div>
  </div>
</div>
<div id="CSPhotoSelectorLoading">
  <div class="overlaywholescreen"></div>
  <div class="CSPhotoSelector_dialog">
    <div class="CSPhotoSelector_form">
      <div class="CSPhotoSelector_header">
        <p>Please wait...</p>
      </div>
      <div class="CSPhotoSelector_content">
        <h1>Importing image <span id="FBImportCurrentPhotoCount">1</span> of <span id="FBImportTotalPhotosCount">1</span>...</h1>
        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/waitwheel.gif" alt="">
        <p><a href="#" class="CSPhotoSelector_Cancel">click here to cancel importing</a></p>
      </div>
    </div>
  </div>
</div>
<div id="CSPhotoSelector"> 
  <div class="overlaywholescreen"></div>
  <div class="CSPhotoSelector_dialog">
    <a href="#" id="CSPhotoSelector_buttonClose">x</a>
    <div class="CSPhotoSelector_form">
      <div class="CSPhotoSelector_header">
        <p>Choose from your Photos</p>
      </div>

      <div class="CSPhotoSelector_content CSAlbumSelector_wrapper">
        <p>Browse your albums to find photos you want to import.</p>
        <div class="CSPhotoSelector_searchContainer CSPhotoSelector_clearfix">
          <div class="CSPhotoSelector_selectedCountContainer">Select an album</div>
        </div>
        <div class="CSPhotoSelector_photosContainer CSAlbum_container"></div>
      </div>

      <div class="CSPhotoSelector_content CSPhotoSelector_wrapper">
        <p>Click the photos you'd like to import, then select IMPORT PHOTOS</p>
        <div class="CSPhotoSelector_searchContainer CSPhotoSelector_clearfix">
          <div class="CSPhotoSelector_selectedCountContainer"><span class="CSPhotoSelector_selectedPhotoCount">0</span> / <span class="CSPhotoSelector_selectedPhotoCountMax">0</span> photos selected</div>
          <a href="#" id="CSPhotoSelector_backToAlbums">Back to albums</a>
        </div>
        <div class="CSPhotoSelector_photosContainer CSPhoto_container"></div>
      </div>

      <div id="CSPhotoSelector_loader"></div>

      <div class="CSPhotoSelector_footer CSPhotoSelector_clearfix">
        <a href="#" id="CSPhotoSelector_pagePrev" class="CSPhotoSelector_disabled">Previous</a>
        <a href="#" id="CSPhotoSelector_pageNext">Next</a>
        <div class="CSPhotoSelector_pageNumberContainer">
          Page <span id="CSPhotoSelector_pageNumber">1</span> / <span id="CSPhotoSelector_pageNumberTotal">1</span>
        </div>
        <a href="#" id="CSPhotoSelector_buttonOK">IMPORT PHOTOS</a>
        <a href="#" id="CSPhotoSelector_buttonCancel">Cancel</a>
      </div>
    </div>
  </div>
</div>

<div id="columnleft">
  <div id="uploadphotoexternal"> </div>
  <h1 class="h1header color-alt ">
    Upload More Photos

  </h1>
  <p class="uploadsubheader ">
    <span>Success! Your photo is currently going through our approval process.</span>
  </p>
  <div class="uploadphotoarea">
    <?php if($photosPrimary != false){ ?>
    <div class="photouploadslot0">
      <div class="deletephotooverlayplace0" id="deleteOverlay<?php echo $photosPrimary['photos_id']; ?>">
        <div class="deletephotooverlayclosebtn0"> <a href="javascript:PeopleMedia.PhotoUpload.CloseDeleteOverlay(<?php echo $photosPrimary['photos_id']; ?>);" title="close"><img src="<?php echo FRONT_SITE_URL ?>www/images/images1/largeclosebtn_002.png" border="0"></a> </div>
        <div class="deletephotooverlay popupshapestyle">
          <p class="deletephotooverlayheadline">Are you sure you want to delete this photo?</p>
          <div class="deletephotooverlayyesno"> <a class="yestext" href="javascript:PeopleMedia.PhotoUpload.ConfirmDeleteOverlay(<?php echo $photosPrimary['photos_id']; ?>);">Yes</a> <a class="button_style" href="javascript:PeopleMedia.PhotoUpload.CloseDeleteOverlay(<?php echo $photosPrimary['photos_id']; ?>);">No</a> </div>
        </div>
        <div class="deletephotooverlayarrow"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/bottomarrow.png"> </div>
      </div>
      <div class="uploadphotobottom">
        <?php if($photosPrimary != false){ ?>
        <img src="<?php echo FRONT_SITE_URL ?>www/uploads/photos/thumbs/<?php echo 'thumb_'.$photosPrimary['link_img'];?>">
        <div class="photooverlayplace">
          <div class="photooverlay"></div>
          <p class="photooverlayp">
            <?php if($photosPrimary['approve'] == 0){ ?>
            Your primary
            photo is pending
            approval</p>
            <?php } ?>
        </div>
        <?php } ?>
        <p class="fourteen"><a href="javascript:PeopleMedia.PhotoUpload.ShowDeleteOverlay(<?php echo $photosPrimary['photos_id']; ?>);" class="delete0">Delete photo</a></p>
        <form action="<?php echo FRONT_SITE_URL; ?>/user/profile/MediaUpload" method="post" id="SaveTitle<?php echo $photosPrimary['photos_id']; ?>">
          <input name="SkipCSSVerif" value="HTMLEditor" type="hidden">
          <input name="processForm" value="update_title" type="hidden">
          <input name="media_id" value="<?php echo $photosPrimary['photos_id']; ?>" type="hidden">
          <input class="inputtextmedium" name="title" size="7" maxlength="25" value="<?php echo $photosPrimary['text']==''?'Add a photo caption':$photosPrimary['text']; ?>" onfocus="PeopleMedia.PhotoUpload.TargetSaveTitle(<?php echo $photosPrimary['photos_id']; ?>);" onkeyup="PeopleMedia.PhotoUpload.HighlightSaveTitle(<?php echo $photosPrimary['photos_id']; ?>);" type="text"><br>
          <input name="UpdateTitle<?php echo $photosPrimary['photos_id']; ?>" value="<?php echo $photosPrimary['photos_id']; ?>" type="hidden">
        </form>
        <div class="buttonclear">
          <a class="button_style buttonunavailable" title="Save" href="javascript:PeopleMedia.PhotoUpload.SaveTitle(<?php echo $photosPrimary['photos_id']; ?>);" id="Submit<?php echo $photosPrimary['photos_id']; ?>">
            Save
          </a> 
        </div>
      </div>
    </div>
    <?php }else{ ?>
    <div class="wrapper">
      <div class="nophotoquestion">?</div>
    </div>
    <div class="uploadphotoleft">
      <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/noPhoto-1.gif">
      <p>Would you want to date a faceless profile?</p>
    </div>
    <?php } ?>

    <div class="uploadphotoright bgcolor-main">
      <div class="uploadphotorightleft">
        <p>
          We allow our members to upload up to 30 photos. 
          We recommend posting lots of photos so people can get a feel for who you
          are and what you're all about.

          <br><br>
          You can upload up to <span class="h1header color-alt"><strong><?php echo $total_photos; ?></strong></span> more photos!
          <br><br><a href="javascript:;" class="launchlargeoverlay">What makes a great primary photo?</a>
        </p>


        <div class="photoerror" id="invalidFileSelected" style="display:none;">
          <p>
            We encountered the following error: Invalid File
            Extension Found. Images must be JPG, BMP, PNG, or GIF format. 
          </p>
        </div>

        <form method="post" action="<?php echo FRONT_SITE_URL; ?>user/profile/ProcessUpload" enctype="multipart/form-data" name="pmiuForm" id="pmiuForm">
          <input name="SkipCSSVerif" value="HTMLEditor" type="hidden">
          <input name="UploadAgentID" value="7" type="hidden">
          <div class="fileuploadformplace"><input size="20" name="uploadFile" id="uploadFile" onchange="PeopleMedia.PhotoUpload.HighlightUpload();" type="file"></div>
          <div class="fileuploadformplace"><input size="20" name="uploadFile2" id="uploadFile2" onchange="PeopleMedia.PhotoUpload.HighlightUpload();" type="file"></div>
          <div class="fileuploadformplace"><input size="20" name="uploadFile3" id="uploadFile3" onchange="PeopleMedia.PhotoUpload.HighlightUpload();" type="file"></div>
          <div class="fileuploadformplace"><input size="20" name="uploadFile4" id="uploadFile4" onchange="PeopleMedia.PhotoUpload.HighlightUpload();" type="file"></div>						
          <input name="type" value="1" type="hidden">
          <input name="title" size="20" maxlength="25" type="hidden">
          <input name="ProcessForm" value="upload_file" type="hidden">
          <input name="Profile" value="96E09406BE166D22" type="hidden">
          <input name="Site" value="21X1114" type="hidden">
          <input name="MediaType" value="1" type="hidden">
        </form>
      </div>
      <div class="uploadphotorightright">
        <div class="photouploadinfo">
          <p>Maximum file size is 5MB<br><br> We accept:<br> JPG, PNG, TIF, BMP, GIF</p>
        </div>
        <div class="morephotouploadspacer">&nbsp; </div>   
        <div class="uploadphotobtnclear"> <a class="button_style buttonunavailable" id="UploadPhotoButton" title="Upload Photo" href="javascript:PeopleMedia.ManageMedia.ExtendedNetworkOnUpload();">Upload Photos</a> </div>
        <p class="skipsteplink2">
          <a href="<?php echo FRONT_SITE_URL; ?>user/profile" id="skipThisStep">I'm finished uploading photos &gt; &gt;</a>					
        </p>
      </div>
      <div class="photouploadfacebook">
        <div class="photouploadfacebookleft">
          <p>You can also upload your favorite Facebook photos &nbsp; &gt;&gt;
          </p></div>

        <div class="photouploadfacebookright"> <a href="#"><img src="<?php echo FRONT_SITE_URL ?>www/images/images1/facebookupload.png" id="facebookPhotoSelect" border="0"></a>
        </div>
      </div>
    </div>
    <div class="photouploadtext" style="height:10px;">
      <input id="extendedNetworkChkBox" checked="checked" type="checkbox">Make my photos available to the BBPeopleMeet.com extended network and search engines. <a href="javascript:;" id="learnmore">Learn More</a>
    </div>

    <div class="photouploadslots">
      <?php if(count($photosAlbum) >0){ 
        $count_item = 1;
        foreach($photosAlbum as $item){
      ?>
      
      <div class="photouploadslot<?php echo ($count_item % 4); ?>">
        <div class="deletephotooverlayplace<?php echo ($count_item % 4); ?>" id="deleteOverlay<?php echo $item['photos_id']; ?>">
          <div class="deletephotooverlayclosebtn1"> <a href="javascript:PeopleMedia.PhotoUpload.CloseDeleteOverlay(<?php echo $item['photos_id']; ?>);" title="close"><img src="<?php echo FRONT_SITE_URL ?>www/images/images1/largeclosebtn_002.png" border="0"></a> </div>
          <div class="deletephotooverlay popupshapestyle">
            <p class="deletephotooverlayheadline">Are you sure you want to delete this photo?</p>
            <div class="deletephotooverlayyesno"> <a class="yestext" href="javascript:PeopleMedia.PhotoUpload.ConfirmDeleteOverlay(<?php echo $item['photos_id']; ?>);">Yes</a> <a class="button_style" href="javascript:PeopleMedia.PhotoUpload.CloseDeleteOverlay(<?php echo $item['photos_id']; ?>);">No</a> </div>
          </div>
          <div class="deletephotooverlayarrow"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/bottomarrow.png"> </div>
        </div>
        <div class="uploadphotobottom">
          <p class="fourteen">

          </p><form action="<?php echo FRONT_SITE_URL; ?>user/profile/MediaUpload" method="post" name="form<?php echo $item['photos_id']; ?>" id="ShowInProfile<?php echo $item['photos_id']; ?>">
            <input name="SkipCSSVerif" value="HTMLEditor" type="hidden">
            <input name="processForm" value="show_in_profile" type="hidden">
            <input name="media_id" value="<?php echo $item['photos_id']; ?>" type="hidden">
            <input name="title" value="" type="hidden">
            <a href="javascript:PeopleMedia.PhotoUpload.ShowInProfile(<?php echo $item['photos_id']; ?>);">Make Primary</a>
            <input name="showinprofile" value="<?php echo $item['photos_id']; ?>" type="hidden">
          </form>

          <p></p>

          <div style="width: 132px; height: 165px; overflow:hidden;">
            <img src="<?php echo FRONT_SITE_URL ?>www/uploads/photos/thumbs/thumb_<?php echo $item['link_img'];?>">
          </div>
          <?php if($item['approve'] == 0) { ?>
          <div class="photooverlayplace">
            <div class="photooverlay2"></div>
            <p class="photooverlayp2">Pending approval</p>
          </div>
          <?php } ?>
          <p class="fourteen"><a href="javascript:PeopleMedia.PhotoUpload.ShowDeleteOverlay(<?php echo $item['photos_id']; ?>);" class="delete1">Delete photo</a></p>
          <form action="<?php echo FRONT_SITE_URL; ?>user/profile/MediaUpload" method="post" id="SaveTitle<?php echo $item['photos_id']; ?>">
            <input name="SkipCSSVerif" value="HTMLEditor" type="hidden">
            <input name="processForm" value="update_title" type="hidden">
            <input name="media_id" value="<?php echo $item['photos_id']; ?>" type="hidden">
            <input class="inputtextmedium bgcolor-input" name="title" size="7" maxlength="25" value="<?php echo $item['text']==''?'Add a photo caption':$item['text']; ?>" onfocus="PeopleMedia.PhotoUpload.TargetSaveTitle(<?php echo $item['photos_id']; ?>);" onkeyup="PeopleMedia.PhotoUpload.HighlightSaveTitle(<?php echo $item['photos_id']; ?>);" type="text"><br>
            <input name="UpdateTitle<?php echo $item['photos_id']; ?>" value="<?php echo $item['photos_id']; ?>" type="hidden">
          </form>
          <div class="buttonclear">
            <a class="button_style buttonunavailable" title="Save" href="javascript:PeopleMedia.PhotoUpload.SaveTitle(<?php echo $item['photos_id']; ?>);" id="Submit<?php echo $item['photos_id']; ?>">
              Save
            </a> 
          </div>
        </div>
      </div>
        <?php
            if($count_item % 4 == 0){
              echo '<div class="photouploadslotextraspace">&nbsp;</div>';              
            }
            $count_item++;
          }
          if($count_item<5){
            for($ii=$count_item;$ii<5;$ii++){
        ?>
              <div class="photouploadslot<?php echo $ii; ?>"> 
                <a title="Add Photo" onclick="document.getElementById('uploadFile').focus();" href="javascript:;">
                  <img width="132" border="0" height="165" src="<?php echo FRONT_SITE_URL ?>www/images/images1/add-photo-1.gif">
                </a> 
              </div>
        <?php
            }
          }
        }else{ ?>
      <div class="photouploadslot1"> 
        <a title="Add Photo" onclick="document.getElementById('uploadFile').focus();" href="javascript:;">
          <img width="132" border="0" height="165" src="<?php echo FRONT_SITE_URL ?>www/images/images1/add-photo-1.gif">
        </a> 
      </div>
      <div class="photouploadslot2"> 
        <a title="Add Photo" onclick="document.getElementById('uploadFile').focus();" href="javascript:;">
          <img width="132" border="0" height="165" src="<?php echo FRONT_SITE_URL ?>www/images/images1/add-photo-1.gif">
        </a> 
      </div>
      <div class="photouploadslot3"> 
        <a title="Add Photo" onclick="document.getElementById('uploadFile').focus();" href="javascript:;">
          <img width="132" border="0" height="165" src="<?php echo FRONT_SITE_URL ?>www/images/images1/add-photo-1.gif">
        </a> 
      </div>
      <div class="photouploadslot4"> 
        <a title="Add Photo" onclick="document.getElementById('uploadFile').focus();" href="javascript:;">
          <img width="132" border="0" height="165" src="<?php echo FRONT_SITE_URL ?>www/images/images1/add-photo-1.gif">
        </a> 
      </div>
      <?php } ?>
      
      
      
    </div>
  </div>
</div>

<script type="text/javascript">
              $jq.namespace('PeopleMedia');
              PeopleMedia.ManageMedia = {
                OptInUrl: FRONT_SITE_URL+'user/profile/TestJsProcessUpload',
                OptInEnabled: true,
                Initialize: function() {
                  try {
                    $jq('#learnmore').click(function() {
                      PeopleMedia.Popups.LearnMore('BBPeopleMeet.com');
                    });
                  } catch (ex) {
                    PeopleMedia.Logger.LogExceptionWithDetail(ex, {method: "PeopleMedia.ManageMedia.Initialize"});
                  }
                },
                ExtendedNetworkOnUpload: function() {

                  // able to submit, now lets remove file fields that didn't have values
                  if (PeopleMedia.PhotoUpload.ableToClickSubmit) {
                    for (var i = 1; i <= 4; i++) {
                      if (i > 1) {
                        uploadFileName = $jq("#uploadFile" + i);
                      } else {
                        uploadFileName = $jq("#uploadFile");
                      }

                      if (uploadFileName.val() != null) {
                        var tempUploadFileName = uploadFileName.val();
                        if (tempUploadFileName.length <= 0) {
                          uploadFileName.remove();
                        }
                      }
                    }
                  }

                  try {
                    var startTime = new Date().getTime();
                    var url = PeopleMedia.ManageMedia.OptInUrl;
                    var timeoutValue = 135000;
                    if (PeopleMedia.PhotoUpload.ableToClickSubmit && PeopleMedia.ManageMedia.OptInEnabled) {
                      $jq.ajax({
                        type: 'POST',
                        url: url,
                        data: {extendedNetworkChkBox: $jq('#extendedNetworkChkBox').prop('checked')},
                        dataType: "json",
                        success: function() {
                        },
                        error: function(jqXHR, textStatus, errorThrown) {
                          if (errorThrown === 'timeout' || (jqXHR.readyState !== 0 && jqXHR.status !== 0)) {
                            var endTime = new Date().getTime();
                            var duration = (endTime - startTime);
                            // PeopleMedia.Popups.ShowGenericMessage(PeopleMedia.Popups.AjaxErrorMessage());
                            PeopleMedia.Logger.LogAjaxErrorXHR("Ajax request failure", url, {method: "Media Manage ExtendedNetworkOnUpload", duration: duration}, jqXHR, textStatus, errorThrown, function() {
                            });
                          }
                        },
                        async: true,
                        cache: false,
                        timeout: timeoutValue,
                        suppressErrors: true
                      });
                    }
                    PeopleMedia.PhotoUpload.UploadPhotos('UploadPhotoButton');
                  } catch (ex) {
                    PeopleMedia.Logger.LogExceptionWithDetail(ex, {method: "PeopleMedia.ManageMedia.ExtendedNetworkOnUpload"});
                  }
                }


              };

              $jq(document).ready(function() {

                if (PeopleMedia.ManageMedia.OptInEnabled) {
                  PeopleMedia.ManageMedia.Initialize();
                }

              });
</script>



<div class="popupshow" style="display: none; ">
  <div class="badpictureoverlayplace">
    <div class="popupshapestyle badpictureoverlay">
      <div class="largestclosebtn"> <a href="#" title="Close"><img src="<?php echo FRONT_SITE_URL ?>www/images/images1/largestclosebtn.png" border="0"></a> </div>
      <div class="overlaytopheadline">
        <h1 class="h1header">Ingredients for a Great Spread</h1>
        <p class="color-alt fifteen">Profile Pix Done to Perfection!</p>
        <div class="tabfix">
          <p class="color-alt tabtwenty">Main Ingredient</p>
          <div class="tabline"> </div>
        </div>
        <div class="toparticle"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/bigpic.jpg">
          <div class="toparticletext">
            <h2>Two cups of "clear"</h2>
            <p>Your primary photo needs to be sharp, well-lit, in focus,
              and no more than a year old. A good primary photo should be cropped so 
              it shows only your head and shoulders. Keep background<br>
              distractions to a minimum. </p>
          </div>
        </div>
        <div class="bottomarticle">
          <div class="bottomarticleleft">
            <p class="color-alt tabtwenty season">Season to Taste</p>
            <div class="tabline2"> </div>
            <div class="goodpicsarea">
              <div class="goodpicsrepeat">
                <div class="goodpicsrepeatpic"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/smallpic1.jpg"> </div>
                <div class="goodpicsrepeattext">
                  <p class="color-alt">A generous helping of "you"</p>
                  <p>Everybody's got their something. What's yours? Put 
                    up a pic of yourself doing what you love to do: your favorite leisure 
                    activity, hobby, or family tradition.</p>
                </div>
              </div>
              <div class="goodpicsrepeat">
                <div class="goodpicsrepeatpic"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/smallpic2.jpg"> </div>
                <div class="goodpicsrepeattext">
                  <p class="color-alt">A spoonful of "sexy"</p>
                  <p>Show yourself out on the town with your friends, 
                    dressed to kill and forgetting all the week's worries. If you're not 
                    into the nightlife, sports or a formal occasion might be just the thing!</p>
                </div>
              </div>
              <div class="goodpicsrepeat">
                <div class="goodpicsrepeatpic"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/smallpic3.jpg"> </div>
                <div class="goodpicsrepeattext">
                  <p class="color-alt">A dash of "us"</p>
                  <p>Vacation pix with the kids, playin' hoops with the 
                    boys, running with your dog around the backyard...These windows into 
                    your life give people something to ask you about.</p>
                </div>
              </div>
            </div>
          </div>
          <div class="bottomarticleright bgcolor-main">
            <div class="badpicsheadline">
              <p class="color-alt seventeen">Good Pix Gone Bad</p>
              <p class="color-alt fourteen">Common mistakes that<br>
                spoil the flavor of your<br>
                photos</p>
            </div>
            <div class="badpicsarea">
              <div class="badpicsrepeat"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/badpic1.jpg">
                <p>Poorly framed shot </p>
              </div>
              <div class="badpicsrepeat"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/badpic2.jpg">
                <p class="moremargin">Bad lighting </p>
              </div>
              <div class="badpicsrepeat"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/badpic3.jpg">
                <p>Stretched/ squeezed </p>
              </div>
              <div class="badpicsrepeat"> <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/badpic4.jpg">
                <p class="moremargin">Blurry </p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="overlaywholescreen"> </div>
</div>


<script type="text/javascript">
                         /*FB.init({ appId: '1476075219273821', cookie: true, status: true, xfbml: true, oauth: true });

                             FB.getLoginStatus(function (response) {
                                 if (response.authResponse) {
                                     $jq("#login-status").html("Logged in");
                                 } else {
                                     $jq("#login-status").html("Not logged in");
                                 }
                             });*/
                          window.fbAsyncInit = function () {
                             FB.init({ appId: '1476075219273821', cookie: true, status: true, xfbml: true, oauth: true });

                             FB.getLoginStatus(function (response) {
                                 if (response.authResponse) {
                                     $jq("#login-status").html("Logged in");
                                 } else {
                                     $jq("#login-status").html("Not logged in");
                                 }
                             });
                         };
                         
                         (function (d) {
                             var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
                             if (d.getElementById(id)) { return; }
                             js = d.createElement('script'); js.id = id; js.async = true;
                             js.src = "//connect.facebook.net/en_US/all.js";
                             ref.parentNode.insertBefore(js, ref);
                         } (document));
	</script>
